package itzzj.test.Iochar;

import java.io.*;

public class IoChar01 {
    public static void main(String[] args) throws IOException {
        String projectPath = System.getProperty("user.dir");
        File readerFile = new File(projectPath + "/描述.txt");
        File writerFile = new File(projectPath + "/copy-" + readerFile.getName());
        // 字符输入输出流
        Reader reader = new FileReader(readerFile);
        Writer writer = new FileWriter(writerFile);
        int readSign;
        // 字符读入和写出
        while ((readSign = reader.read()) != -1){
            writer.write(readSign);
        }
        writer.flush();
        writer.close();
        reader.close();
    }
}


























